package org.tongdao.yulong.servlet;

import org.tongdao.yulong.service.DemoService;
import org.tongdao.yulong.service.impl.DemoServiceImpl;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description: TODO
 * @author: 殷玉龙
 * @date: 2020年09月27日 2:44 下午
 */
@WebServlet(urlPatterns = "/demo1")
public class DemoServlet1 extends HttpServlet {

  DemoService demoService = new DemoServiceImpl();

  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    resp.getWriter().println(demoService.findAll().toString());
  }
}
